<?

require('../bootstrap.php');
auth_redirect();

if (isset($_POST['id'])) {
	$r = $db->execute("DELETE FROM $pages_table WHERE id = $_POST[id]");
	if ($r == 1) {
		redirect('pages.php');
	} else {
		redirect('pages.php?errorDeletingPage=1');
	}
}
redirect('pages.php');


?>